﻿@using INNOVACALL.Framework.Common
@using InnovaApp.Layers.ResourcesLayer.Properties
@{
    string StyleBundleBase = string.Empty;
    InnovaApp.Layers.CommonLayer.Models.ViewModels.LayoutViewModels._LayoutViewModels_Base layoutModel =
        (InnovaApp.Layers.CommonLayer.Models.ViewModels.LayoutViewModels._LayoutViewModels_Base)Model;
    string JQueryUITheme = InnovaApp.Portals.MVC4Portal.Controllers.PortalEnvironment.JQueryUITheme;
    bool CustomTheme = JQueryUITheme.ToLower() != "base";
}
<!DOCTYPE html>
<html lang="en" class="siteBackground">
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width" />
    @foreach (var item in layoutModel._Meta)
    { 
        <meta name="@item.Key.ToString()" content="@item.Value" />
    }
    <title>@layoutModel._PageTitle</title>
    <link href="@Url.Content("~/CSSG/Site.css")" rel="stylesheet" type="text/css" />
    <link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
    @*<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>*@
    <!--Bundle Manager-->
    @Scripts.Render("~/bundles/jquery")
    @Scripts.Render("~/bundles/jqueryui")
    @Scripts.Render("~/bundles/jqueryplugins")
    @Scripts.Render("~/bundles/jqueryballoon")
    @if (layoutModel._UsesKendoUI)
    {
        @Scripts.Render("~/bundles/kendoui")
    }
    @Scripts.Render("~/bundles/jqueryval")
    @Scripts.Render("~/bundles/modernizr")
    @Scripts.Render("~/bundles/views")


    <link rel="stylesheet" href="/Content/themes/base/minified/jquery-ui.min.css">
    @if (CustomTheme)
    { 
        <link rel="stylesheet" href="/Content/themes/@InnovaApp.Portals.MVC4Portal.Controllers.PortalEnvironment.JQueryUITheme/jquery-ui-1.9.2.custom.min.css">
    }


    @Styles.Render("~/Content/ClientComponents/boxshadow/css")


    @if (layoutModel._UsesKendoUI)
    {
        @Styles.Render("~/Content/clientComponents/KendoUI/css")
    }
    <!--/Bundle Manager-->
    @if (layoutModel._SpecificCSS != null)
    {
        foreach (var cssReference in layoutModel._SpecificCSS)
        { 
        <link href="@Url.Content("~/Content/" + cssReference)" rel="stylesheet" type="text/css" />
        }
    }
    @if (layoutModel._externalCss != null)
    {
        foreach (var cssReference in layoutModel._externalCss)
        { 
        <link href="@cssReference" rel="stylesheet" type="text/css" />
        }
    }
    @if (layoutModel._externalJs != null)
    {
        foreach (var jsReference in layoutModel._externalJs)
        { 
        <script src="@Url.Content(jsReference)" type="text/javascript"></script>
        }
    }
    @foreach (var jsReference in layoutModel._SpecificJS)
    { 
        <script src="@Url.Content("~/Scripts/" + jsReference)" type="text/javascript"></script>
    }
    @if (!InnovaApp.Portals.MVC4Portal.Controllers.PortalEnvironment.JQueryUIRoundedCorners)
    {
        <style type="text/css">
            .ui-corner-all {
                border-radius: 0px!important;
                -moz-border-radius-bottomright: 0px!important;
                -moz-border-radius-bottomleft: 0px!important;
                -moz-border-radius-topright: 0px!important;
                -moz-border-radius-topleft: 0px!important;
            }
        </style>                        
    }
    @if (IsSectionDefined("HeadLocalCSS"))
    {
        @RenderSection("HeadLocalCSS")
    }
</head>
<body>
    @Html.Hidden("hidOpeningMessage", layoutModel._PageMessage)
    <!--KendoUI Add-->
    <style scoped>
        #customValue {
            line-height: 16px;
            width: 60px;
            float: none;
            margin: -3px 0 0 5px;
        }
    </style>
    <!--/KendoUI Add-->
    <div id="divMceRibbonBarPlaceholder" class="notDisplayed">
        <span class="mceEditor defaultSkin">
            <table class="mceLayout">
            </table>
        </span>
    </div>
    @RenderBody()
    @if (IsSectionDefined("SiteFooter"))
    {
        @RenderSection("SiteFooter")
    }
    <div class="notDisplayed" id="SingleFileUploadDialogDiv">
        @using (Html.BeginForm("", "SingleFileUpload", FormMethod.Post, new { id = "SingleFileUploadForm", enctype = "multipart/form-data", target = "SingleFileUploadIFrame" }))
        { 
            <input type="file" id="SingleFileUploadFileInput" name="SingleFileUploadFileInput" class="ui-autocomplete-input ui-widget-content ui-corner-all" />    
            <input type="hidden" name="SingleFileUploadImageToUpdateIdHidden" id="SingleFileUploadImageToUpdateIdHidden" />
            <input type="submit" id="SingleFileUploadSubmitButton" />
        }
        <iframe class="notDisplayed" name="SingleFileUploadIFrame"></iframe>
    </div>
</body>
@if (layoutModel._SpecificJqueryJS != null)
{
    foreach (var specificJqueryJSReference in layoutModel._SpecificJqueryJS)
    {
        string prefix = string.Empty;
        if (!specificJqueryJSReference.StartsWith("http"))
        {
            prefix = "~/Scripts/";
        }
    <script src="@Url.Content(prefix + specificJqueryJSReference)" type="text/javascript"></script>
    }
}
@if (layoutModel._DynamicJqueryJS != null)
{
    foreach (var dynamicJqueryJS in layoutModel._DynamicJqueryJS)
    { 
    <script src="@Url.Content("~" + dynamicJqueryJS)" type="text/javascript"></script>
    }
}
@Html.Raw(@"<script type=""text/javascript"">")
@Html.Raw(string.Format(@"var uiLanguage='{0}';", System.Threading.Thread.CurrentThread.CurrentCulture.Name.ToLower()))
@{
    
    foreach (string variable in layoutModel._JSVariables)
    {
    @Html.Raw(variable);
    }
}
@Html.Raw(@"$(document).ready(function () {")
@Html.Raw(@"	$.fn.DocReady();")
@Html.Raw(@"});")
@Html.Raw(@"</script>")
</html>
